package com.aruba.serviceapplication

import android.app.Service
import android.content.Intent
import android.os.IBinder
import android.util.Log

/**
 * Created by aruba on 2021/11/17.
 */
class MyService : Service() {
    private val binder by lazy {
        object : IMyAidlInterface.Stub() {
            override fun send(request: RequestData?): ResponseData {
                Log.i("service", "receive:${request?.data}")

                return ResponseData("i'm service message")
            }
        }.asBinder()
    }

    override fun onBind(intent: Intent?): IBinder? {
        return binder
    }
}